package com.zzx.schoolfellow.controller;

import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;
import com.zzx.schoolfellow.common.api.ApiResult;
import com.zzx.schoolfellow.config.VerifyCode;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Random;

/**
 * @program: schoolfeoolw_backend
 * @description: 验证码
 * @author: zzx
 * @create: 2023-05-04 12:32
 **/
@RestController
@RequestMapping("/captcha")
public class CaptchaController {

    @GetMapping("/getVerifyCode")
    public ApiResult getVerifyCode() {
        VerifyCode verifyCode = new VerifyCode();
        return ApiResult.success(verifyCode);
    }
}
